﻿using AnlianCommon.Common.Domains.BankCustomers;
using AnlianCommon.Common.DTO;
using AnlianCommon.Enum;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SheepCommon.API.Procurements;

namespace SheepCommon.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class GPpricesController : ControllerBase
    {
        private readonly IMediator _mediator;

        public GPpricesController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 采购价格新增
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Result> ProcurementCreate(ProcurementCreateCommand request, CancellationToken cancellationToken)
        {
            var result = await _mediator.Send(request);
            return result;
        }


    }
}
